import React, { Component } from 'react'
import { NavLink } from "react-router-dom"

export class RouterLink extends Component {
    render() {
        const { routerConfig } = this.props;
        return (
            <div className='footer'>
                {
                    routerConfig.length ?
                        routerConfig.map((item, index) => {
                            return <NavLink
                                key={index}
                                to={item.path}
                            >
                                <p>{item.icon}</p>
                                <p>{item.title}</p>
                            </NavLink>
                        }) : "暂无路由按钮"
                }
            </div>
        )
    }
}

export default RouterLink